﻿/* Copyright(C) 2006-2008 Dave Sexton  *
 * http://www.codeplex.com/aip         *
 * http://www.codeplex.com/aip/license *
 ***************************************/
using System;
using System.Collections.Generic;
using System.Text;

namespace DaveSexton.Web.Controls
{
	/// <summary>
	/// The exception that is thrown when session state is required, but not enabled.
	/// </summary>
	/// <remarks>
	/// <see cref="SessionStateRequiredException"/> is thrown by <see cref="AutoInputProtection.GetCachedImageStream"/> 
	/// when <see cref="AutoInputProtectionRequestHandler"/> is used in the application instead of <see cref="AutoInputProtectionSessionRequestHandler"/> 
	/// while <see cref="AutoInputProtection.PersistenceMode"/> is set to <see cref="AutoInputProtectionPersistenceMode.Session"/>.
	/// </remarks>
	[Serializable]
	public sealed class SessionStateRequiredException : Exception
	{
		#region Constructors
		/// <summary>
		/// Constructs a new instance of the <see cref="SessionStateRequiredException" /> class.
		/// </summary>
		public SessionStateRequiredException()
			: base(Resources.Errors.SessionStateRequired)
		{
		}
		#endregion
	}
}
